package com.flkin.common.config;

import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;

import java.util.Optional;

/**
 * @author yanxiang.huang
 */
@Component("auditorAware")
public class AuditorConfig implements AuditorAware<String> {

    /**
     * 返回操作员信息
     *
     * @return auditor
     */
    @Override
    public Optional<String> getCurrentAuditor() {
        try {
            return Optional.of("System");
        } catch (Exception ignored) {

        }
        return Optional.of("System");
    }

}
